<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>View Latest Articles</title>
    </h:head>
    <h:body>
        <h:form id="viewLatestArtForm" prependId="false">
            <p:dataTable styleClass="sample" id="table" value="#{articleBean.latestArticles}" var="art">               
                <f:facet name="header">
                    <h:outputText value="Latest Articles" />
                </f:facet>
                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Id" />
                    </f:facet>
                    <h:outputText value="#{art.id}" />
                </p:column>
                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Status" />
                    </f:facet>
                    <h:outputText value="#{art.status}" />
                </p:column>
                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Date of publication" />
                    </f:facet>
                    <h:outputText value="#{art.date}" />
                </p:column>
                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Title" />
                    </f:facet>
                    <h:outputText value="#{art.title}" />
                </p:column>
                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Article Text" />
                    </f:facet>
                    <h:outputText value="#{art.articleBody}" />
                </p:column>
            </p:dataTable>
        </h:form>
    </h:body>
</html>


